package com.ruoyi.projects2.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.projects2.mapper.JwUndergraduateResearchProjectsMapper;
import com.ruoyi.projects2.domain.JwUndergraduateResearchProjects;
import com.ruoyi.projects2.service.IJwUndergraduateResearchProjectsService;

/**
 * 科研项目管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwUndergraduateResearchProjectsServiceImpl implements IJwUndergraduateResearchProjectsService 
{
    @Autowired
    private JwUndergraduateResearchProjectsMapper jwUndergraduateResearchProjectsMapper;

    /**
     * 查询科研项目管理
     * 
     * @param id 科研项目管理主键
     * @return 科研项目管理
     */
    @Override
    public JwUndergraduateResearchProjects selectJwUndergraduateResearchProjectsById(Long id)
    {
        return jwUndergraduateResearchProjectsMapper.selectJwUndergraduateResearchProjectsById(id);
    }

    /**
     * 查询科研项目管理列表
     * 
     * @param jwUndergraduateResearchProjects 科研项目管理
     * @return 科研项目管理
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwUndergraduateResearchProjects> selectJwUndergraduateResearchProjectsList(JwUndergraduateResearchProjects jwUndergraduateResearchProjects)
    {
        return jwUndergraduateResearchProjectsMapper.selectJwUndergraduateResearchProjectsList(jwUndergraduateResearchProjects);
    }

    /**
     * 新增科研项目管理
     * 
     * @param jwUndergraduateResearchProjects 科研项目管理
     * @return 结果
     */
    @Override
    public int insertJwUndergraduateResearchProjects(JwUndergraduateResearchProjects jwUndergraduateResearchProjects)
    {
        return jwUndergraduateResearchProjectsMapper.insertJwUndergraduateResearchProjects(jwUndergraduateResearchProjects);
    }

    /**
     * 修改科研项目管理
     * 
     * @param jwUndergraduateResearchProjects 科研项目管理
     * @return 结果
     */
    @Override
    public int updateJwUndergraduateResearchProjects(JwUndergraduateResearchProjects jwUndergraduateResearchProjects)
    {
        jwUndergraduateResearchProjects.setUpdateTime(DateUtils.getNowDate());
        return jwUndergraduateResearchProjectsMapper.updateJwUndergraduateResearchProjects(jwUndergraduateResearchProjects);
    }

    /**
     * 批量删除科研项目管理
     * 
     * @param ids 需要删除的科研项目管理主键
     * @return 结果
     */
    @Override
    public int deleteJwUndergraduateResearchProjectsByIds(Long[] ids)
    {
        return jwUndergraduateResearchProjectsMapper.deleteJwUndergraduateResearchProjectsByIds(ids);
    }

    /**
     * 删除科研项目管理信息
     * 
     * @param id 科研项目管理主键
     * @return 结果
     */
    @Override
    public int deleteJwUndergraduateResearchProjectsById(Long id)
    {
        return jwUndergraduateResearchProjectsMapper.deleteJwUndergraduateResearchProjectsById(id);
    }
}
